/**
 *  后台商品接口
 */
import request from '@/utils/request'

export function getProdList(params) {
  return request({
    url: '/prod/prodshow',
    method: 'get',
    params
  })
}

export function prodAdd(data) {
  return request({
    url: '/prod/creprod',
    method: 'post',
    data
  })
}

export function prodEdit(data) {
  return request({
    url: '/prod/edtprod',
    method: 'post',
    data
  })
}

export function prodStatus(data) {
  return request({
    url: '/prod/prodstatus',
    method: 'post',
    data
  })
}

export function setProd(data) {
  return request({
    url: '/prod/setprod',
    method: 'post',
    data
  })
}

export function getProsets(params) {
  return request({
    url: '/prod/prosets',
    method: 'get',
    params
  })
}

export function getCates(params) {
  return request({
    url: '/prod/cateshow',
    method: 'get',
    params
  })
}

export function addCate(data) {
  return request({
    url: '/prod/crecate',
    method: 'post',
    data
  })
}

export function editCate(data) {
  return request({
    url: '/prod/edtcate',
    method: 'post',
    data
  })
}

export function setProdImg(data) {
  return request({
    url: '/prod/setimgs',
    method: 'post',
    data
  })
}

//积分商品
export function getJPro(params) {
  return request({
    url: '/prod/jproshow',
    method: 'get',
    params
  })
}

export function addJPro(data) {
  return request({
    url: '/prod/jprocre',
    method: 'post',
    data
  })
}

export function editJPro(data) {
  return request({
    url: '/prod/jproedt',
    method: 'post',
    data
  })
}

export function setJProStatus(data) {
  return request({
    url: '/prod/jproset',
    method: 'post',
    data
  })
}

export function setJProImg(data) {
  return request({
    url: '/prod/jfenimgs',
    method: 'post',
    data
  })
}
